home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 2 / Meeting Pearls Vol. II (1995)(GTI - Schatztruhe)[!].iso / Pearls / gfx / GhostView / gs.man < prev    next >
Text File  |  1993-06-08  |  13KB  |  417 lines

  1.  
  2.  
  3.  
  4. GS(1)                                                       GS(1)
  5.  
  6.  
  7. NAME
  8.        gs - Ghostscript version 2.6 interpreter/previewer
  9.  
  10. SYNOPSIS
  11.        gs [ options ] [ files ] ...
  12.             -------     -----
  13.  
  14. DESCRIPTION
  15.        Ghostscript  is  a  programming  language similar to Adobe
  16.        Systems' PostScript (tm) language, which is in turn  simi­
  17.        lar  to  Forth.   Gs  reads files in sequence and executes
  18.                          --        -----
  19.        them as Ghostscript programs.  After doing this, it  reads
  20.        further input from the standard input stream (normally the
  21.        keyboard).  Each line is interpreted separately.  To  exit
  22.        from  the  interpreter,  enter  the  `quit'  command.  The
  23.        interpreter also exits gracefully if it encounters end-of-
  24.        file.   Typing the interrupt character (e.g. Control-C) is
  25.        also safe.
  26.  
  27.        The  interpreter  recognizes  several  switches  described
  28.        below,  which  may appear anywhere in the command line and
  29.        apply to all files thereafter.
  30.  
  31.        You can get a help message by  invoking  Ghostscript  with
  32.        the  -h or -?  option.  This message also lists the avail­
  33.        able devices.
  34.  
  35.        Ghostscript may be built  with  multiple  output  devices.
  36.        Ghostscript  normally opens the first one and directs out­
  37.        put to it.  To  use  device  xyz  as  the  initial  output
  38.        device, include the switch
  39.             -sDEVICE=xyz
  40.        in  the  command line.  Note that this switch must precede
  41.        the first .ps file, and only its first invocation has  any
  42.        effect.   For example, for printer output in a normal con­
  43.        figuration that includes  an  Epson  printer  driver,  you
  44.        might use the shell command
  45.             gs -sDEVICE=epson myfile.ps
  46.        instead of just
  47.             gs myfile.ps
  48.        Alternatively, you can type
  49.             (epson) selectdevice
  50.             (myfile.ps) run
  51.        All output then goes to the printer instead of the display
  52.        until further notice.  You can switch devices at any  time
  53.        by using the selectdevice procedure, e.g.,
  54.             (vga) selectdevice
  55.        or
  56.             (epson) selectdevice
  57.        As  yet a third alternative, you can define an environment
  58.        variable GS_DEVICE as the  desired  default  device  name.
  59.        The order of precedence for these alternatives, highest to
  60.        lowest, is:
  61.             selectdevice
  62.             (command line)
  63.  
  64.  
  65.  
  66.                            10 May 1993                          1
  67.  
  68.  
  69.  
  70.  
  71.  
  72. GS(1)                                                       GS(1)
  73.  
  74.  
  75.             GS_DEVICE
  76.             (first device in build list)
  77.  
  78.        To select the density on a printer, use
  79.             gs -sDEVICE=<device> -r<xres>x<yres>
  80.        For example, on a 9-pin Epson-compatible printer, you  can
  81.        get the lowest-density (fastest) mode with
  82.             gs -sDEVICE=epson -r60x72
  83.        and the highest-density mode with
  84.             gs -sDEVICE=epson -r240x72.
  85.  
  86.        If  you select a printer as the output device, Ghostscript
  87.        also allows you to control where the device sends its out­
  88.        put.   Normally, output goes directly to a scratch file on
  89.        Unix systems.  To send the output to  a  series  of  files
  90.        foo1.xyz, foo2.xyz, ..., use the switch
  91.             -sOutputFile=foo%d.xyz
  92.        The %d is a printf format specification; you can use other
  93.        formats like %02d.  Each file will  receive  one  page  of
  94.        output.   Alternatively,  to  send  the output to a single
  95.        file foo.xyz, with all the  pages  concatenated,  use  the
  96.        switch
  97.             -sOutputFile=foo.xyz
  98.  
  99.        On  Unix  systems,  you  can send the output directly to a
  100.        pipe.  For example, to pipe  the  output  to  the  command
  101.        `lpr'  (which,  on  many Unix systems, is the command that
  102.        spools output for a printer), use the switch
  103.             -sOutputFile=lpr
  104.        You can also send output to stdout  for  piping  with  the
  105.        switch
  106.             -sOutputFile=-
  107.        In  this  case you must also use the -q switch, to prevent
  108.        Ghostscript from writing messages to stdout.
  109.  
  110.        To find out what devices are available, type
  111.             devicenames ==
  112.        after starting up Ghostscript.  Alternatively, you can use
  113.        the  -h or -? switch in the command line; the help message
  114.        also lists the available devices.
  115.  
  116.        When looking for the initialization files  (gs_*.ps),  the
  117.        files  related  to fonts, or the file for the `run' opera­
  118.        tor, Ghostscript first tries opening  the  file  with  the
  119.        name  as  given (i.e., using the current working directory
  120.        if none is specified).  If this fails, and the  file  name
  121.        doesn't  specify  an  explicit  directory  or drive (i.e.,
  122.        doesn't begin with `/' on Unix systems), Ghostscript  will
  123.        try directories in the following order:
  124.  
  125.        1.     The directory/ies specified by the -I switch(es) in
  126.               the command line (see below), if any;
  127.  
  128.        2.     The   directory/ies   specified   by   the   GS_LIB
  129.  
  130.  
  131.  
  132.                            10 May 1993                          2
  133.  
  134.  
  135.  
  136.  
  137.  
  138. GS(1)                                                       GS(1)
  139.  
  140.  
  141.               environment variable, if any;
  142.  
  143.        3.     The  directory/ies  specified by the GS_LIB_DEFAULT
  144.               macro in the Ghostscript makefile (which  has  been
  145.               set                                              to
  146.               "/usr/local/lib/ghostscript:/usr/local/lib/ghostscript/fonts").
  147.  
  148.        Each  of  these (GS_LIB_DEFAULT, GS_LIB, and -I parameter)
  149.        may be either a single directory, or a list of directories
  150.        separated by a `:'.
  151.  
  152. X RESOURCES
  153.        Ghostscript  looks  for  the following resources under the
  154.        program name `Ghostscript':
  155.  
  156.        borderWidth
  157.               The border width in pixels (default = 1).
  158.  
  159.        borderColor
  160.               The name of the border color (default = black).
  161.  
  162.        geometry
  163.               The window size and placement, WxH+X+Y (default  is
  164.               NULL).
  165.  
  166.        xResolution
  167.               The  number  of  x pixels per inch (default is com­
  168.               puted from WidthOfScreen and WidthMMOfScreen).
  169.  
  170.        yResolution
  171.               The number of y pixels per inch  (default  is  com­
  172.               puted from HeightOfScreen and HeightMMOfScreen).
  173.  
  174.        useBackingPixmap
  175.               Determines  whether backing store is to be used for
  176.               saving display window (default = true).
  177.  
  178.        See the  file  `use.doc'  for  a  more  complete  list  of
  179.        resources.
  180.  
  181.        To  set  these  resources,  put  them  in  a file (such as
  182.        ~/.Xresources) in the following form:
  183.  
  184.             Ghostscript*geometry:    612x792-0+0
  185.             Ghostscript*xResolution: 72
  186.             Ghostscript*yResolution: 72
  187.  
  188.        Then load the defaults into the X server:
  189.  
  190.             % xrdb -merge ~/.Xresources
  191.  
  192. OPTIONS
  193.        -- filename arg1 ...
  194.           -------- ---- ---
  195.               Takes the next argument as a file  name  as  usual,
  196.  
  197.  
  198.  
  199.                            10 May 1993                          3
  200.  
  201.  
  202.  
  203.  
  204.  
  205. GS(1)                                                       GS(1)
  206.  
  207.  
  208.               but  takes  all  remaining  arguments (even if they
  209.               have the syntactic form of  switches)  and  defines
  210.               the  name ARGUMENTS in userdict (not systemdict) as
  211.               an array of those strings, before running the file.
  212.                                          ------
  213.               When  Ghostscript  finishes  executing the file, it
  214.               exits back to the shell.
  215.  
  216.        -Dname=token
  217.          ---- -----
  218.        -dname=token
  219.          ---- -----
  220.               Define a name in systemdict with the given  defini­
  221.               tion.   The  token  must  be  exactly one token (as
  222.               defined by the `token' operator) and must not  con­
  223.               tain any whitespace.
  224.  
  225.        -Dname
  226.          ----
  227.        -dname Define a name in systemdict with value=null.
  228.          ----
  229.  
  230.        -Sname=string
  231.          ---- ------
  232.        -sname=string
  233.          ---- ------
  234.               Define  a name in systemdict with a given string as
  235.               value.  This is different from  -d.   For  example,
  236.               -dname=35 is equivalent to the program fragment
  237.                              /name 35 def
  238.               whereas -s name=35 is equivalent to
  239.                              /name (35) def
  240.  
  241.        -q     Quiet  startup  - suppress normal startup messages,
  242.               and also do the equivalent of -dQUIET.
  243.  
  244.        -gnumber1xnumber2
  245.          ------- -------
  246.               Equivalent to -dDEVICEWIDTH=number1  and  -dDEVICE­
  247.                                           -------
  248.               HEIGHT=number2.  This is for the benefit of devices
  249.                      -------
  250.               (such as X11 windows) that require (or allow) width
  251.               and height to be specified.
  252.  
  253.        -rnumber
  254.          ------
  255.        -rnumber1xnumber2
  256.          ------- -------
  257.               Equivalent to -dDEVICEXRESOLUTION=number1 and -dDE­
  258.                                                 -------
  259.               VICEYRESOLUTION=number2.  This is for  the  benefit
  260.                               -------
  261.               of devices (such as printers) that support multiple
  262.               X and Y resolutions.  (If only one number is given,
  263.               it is used for both X and Y resolutions.)
  264.  
  265.        -Idirectories
  266.          -----------
  267.               Adds the designated list of directories at the head
  268.               of the search path for library files.
  269.  
  270.        -      This is not  really  a  switch.   It  indicates  to
  271.               Ghostscript  that the standard input is coming from
  272.               a file or a pipe.   Ghostscript  reads  from  stdin
  273.               until  reaching  end-of-file, executing it like any
  274.               other file, and then continues processing the  com­
  275.               mand  line.   At  the  end  of  the  command  line,
  276.               Ghostscript  exits  rather  than  going  into   its
  277.  
  278.  
  279.  
  280.                            10 May 1993                          4
  281.  
  282.  
  283.  
  284.  
  285.  
  286. GS(1)                                                       GS(1)
  287.  
  288.  
  289.               interactive mode.
  290.  
  291.        Note  that  gs_init.ps  makes systemdict read-only, so the
  292.        values of names defined with -D/d/S/s  cannot  be  changed
  293.        (although,  of  course,  they can be superseded by defini­
  294.        tions in userdict or other dictionaries.)
  295.  
  296. SPECIAL NAMES
  297.        -dDISKFONTS
  298.               Causes individual character outlines to  be  loaded
  299.               from  the disk the first time they are encountered.
  300.               (Normally Ghostscript loads all the character  out­
  301.               lines  when it loads a font.)  This may allow load­
  302.               ing more fonts into RAM, at the expense  of  slower
  303.               rendering.
  304.  
  305.        -dNOCACHE
  306.               Disables character caching.  Only useful for debug­
  307.               ging.
  308.  
  309.        -dNOBIND
  310.               Disables the  `bind'  operator.   Only  useful  for
  311.               debugging.
  312.  
  313.        -dNODISPLAY
  314.               Suppresses  the normal initialization of the output
  315.               device.  This may be useful when debugging.
  316.  
  317.        -dNOPAUSE
  318.               Disables the prompt and pause at the  end  of  each
  319.               page.  This may be desirable for applications where
  320.               another program is `driving' Ghostscript.
  321.  
  322.        -dNOPLATFONTS
  323.               Disables the use of fonts supplied by the  underly­
  324.               ing  platform (e.g. X Windows).  This may be needed
  325.               if the platform fonts  look  undesirably  different
  326.               from the scalable fonts.
  327.  
  328.        -dSAFER
  329.               Disables  the  deletefile and renamefile operators,
  330.               and the ability to open files  in  any  mode  other
  331.               than read-only.  This may be desirable for spoolers
  332.               or other sensitive environments.
  333.  
  334.        -dWRITESYSTEMDICT
  335.               Leaves systemdict writable.  This is necessary when
  336.               running special utility programs such as font2c and
  337.               pcharstr,  which  must  bypass  normal   PostScript
  338.               access protection.
  339.  
  340.        -sDEVICE=device
  341.                 ------
  342.               Selects  an  alternate  initial  output  device, as
  343.               described above.
  344.  
  345.  
  346.  
  347.                            10 May 1993                          5
  348.  
  349.  
  350.  
  351.  
  352.  
  353. GS(1)                                                       GS(1)
  354.  
  355.  
  356.        -sOutputFile=filename
  357.                     --------
  358.               Selects an alternate output file (or pipe) for  the
  359.               initial output device, as described above.
  360.  
  361. FILES
  362.        /usr/local/lib/ghostscript/*
  363.               Startup-files,  utilities,  and  basic font defini­
  364.               tions.
  365.  
  366.        /usr/local/lib/ghostscript/fonts/*
  367.               Additional font definitions.
  368.  
  369.        /usr/local/lib/ghostscript/examples/*
  370.               Demo Ghostscript files.
  371.  
  372.        /usr/local/lib/doc/ghostscript/doc/*
  373.               Assorted document files.
  374.  
  375. SEE ALSO
  376.        The various Ghostscript document files (above).
  377.  
  378. BUGS
  379.        See the network news group `gnu.ghostscript.bug'.
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.                            10 May 1993                          6
  415.  
  416.  
  417.